<?php /* Smarty version Smarty-3.0.8, created on 2015-10-15 11:26:00
         compiled from "/var/www/html/magroup/admin/tpl/category_index.html" */ ?>
<?php /*%%SmartyHeaderCode:2123433751561f1cc8be4153-28782600%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'bbee464e3c0f81026720b945630afa305f210e80' => 
    array (
      0 => '/var/www/html/magroup/admin/tpl/category_index.html',
      1 => 1444876874,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2123433751561f1cc8be4153-28782600',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php $_template = new Smarty_Internal_Template("tpl/header.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate(); $_template->rendered_content = null;?><?php unset($_template);?>
<h2 class="ytadmin-h2"><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Category"),$_smarty_tpl);?>
</h2>

<div class="ytadmin-form-wrap">

	<form class="form-inline" role="form" action="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'category','a'=>'index'),$_smarty_tpl);?>
" method="post">
	 	<div class="form-group">
	    	<label class="sr-only" for="cat_name"><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Category"),$_smarty_tpl);?>
 <?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Name"),$_smarty_tpl);?>
：</label>
	    	<input type="text" name="cat_name" class="form-control" id="cat_name" placeholder='<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Category"),$_smarty_tpl);?>
 <?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Name"),$_smarty_tpl);?>
'>
	  	</div>
	  	<div class="form-group">
			<label class="sr-only" for="cat_father_id"><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Father Category"),$_smarty_tpl);?>
：</label>
			<select class="form-control" name="cat_father_id" id="cat_father_id">
				<?php if ($_smarty_tpl->getVariable('now_cat_info')->value){?>
					<option value='<?php echo $_smarty_tpl->getVariable('now_cat_info')->value["id"];?>
'><?php echo $_smarty_tpl->getVariable('now_cat_info')->value['name'];?>
</option>
				<?php }else{ ?>
					<option value='0'><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Top Category"),$_smarty_tpl);?>
</option>
				<?php }?>
				<?php  $_smarty_tpl->tpl_vars['cat_item'] = new Smarty_Variable;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('cat_result')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['cat_item']->key => $_smarty_tpl->tpl_vars['cat_item']->value){
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['cat_item']->key;
?>
					<?php if ($_smarty_tpl->getVariable('data_return')->value['cat_father_id']==$_smarty_tpl->tpl_vars['cat_item']->value['id']){?>
						<option value="<?php echo $_smarty_tpl->tpl_vars['cat_item']->value['id'];?>
" selected="selected"><?php echo $_smarty_tpl->tpl_vars['cat_item']->value['name'];?>
</option>
					<?php }else{ ?>
						<option value="<?php echo $_smarty_tpl->tpl_vars['cat_item']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['cat_item']->value['name'];?>
</option>
					<?php }?>
				<?php }} ?>

			</select>
		</div>
		<div class="form-group">
			<label class="sr-only" for="cat_module"><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Module"),$_smarty_tpl);?>
：</label>

			<select class="form-control" name="cat_module" id="cat_module">
			<?php if ($_smarty_tpl->getVariable('now_cat_info')->value){?>
				<option value='<?php echo $_smarty_tpl->getVariable('now_cat_info')->value["module"];?>
'><?php echo $_smarty_tpl->getVariable('now_cat_info')->value["module"];?>
</option>
			<?php }else{ ?>
				<option value='article'><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Article"),$_smarty_tpl);?>
</option>
				<option value='picture'><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Album"),$_smarty_tpl);?>
</option>
				<option value='page'><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Page"),$_smarty_tpl);?>
</option>
				<option value='url'><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Url"),$_smarty_tpl);?>
</option>
		  	<?php }?>
		  	</select>
		  	
		</div>
		<div class="form-group">
	    	<label class="sr-only" for="cat_weight"><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Order"),$_smarty_tpl);?>
：</label>
	    	<input type="text" name="cat_weight" class="form-control ytadmin-input-min" id="cat_weight" placeholder='<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Order"),$_smarty_tpl);?>
'>
	  	</div>
		<div class="form-group">
			<input type="submit" name="cat_new_submit" class="btn btn-info" value='<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Add"),$_smarty_tpl);?>
'/>
		</div>
	</form>
	
</div>
<div class="ytadmin-table-wrap">
	<table class="table table-striped">
		<tr>
			<th>ID</th>
			<th><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Module"),$_smarty_tpl);?>
</th>
			<th><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Name"),$_smarty_tpl);?>
/<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Order"),$_smarty_tpl);?>
</th>
			<th><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Son"),$_smarty_tpl);?>
 <?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Category"),$_smarty_tpl);?>
</th>
			<th><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Visibility"),$_smarty_tpl);?>
</th>
			<th><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Opera"),$_smarty_tpl);?>
</th>
		</tr>
		<?php  $_smarty_tpl->tpl_vars['cat_item'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('cat_result')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['cat_item']->key => $_smarty_tpl->tpl_vars['cat_item']->value){
?>
		<tr>
			<td><?php echo $_smarty_tpl->tpl_vars['cat_item']->value['id'];?>
</td>
			<td>
				<?php if ($_smarty_tpl->tpl_vars['cat_item']->value['module']=='0'){?>
					<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"None"),$_smarty_tpl);?>

				<?php }elseif($_smarty_tpl->tpl_vars['cat_item']->value['module']=='article'){?>
					<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Article"),$_smarty_tpl);?>

				<?php }elseif($_smarty_tpl->tpl_vars['cat_item']->value['module']=='picture'){?>
					<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Album"),$_smarty_tpl);?>

				<?php }elseif($_smarty_tpl->tpl_vars['cat_item']->value['module']=='page'){?>
					<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Page"),$_smarty_tpl);?>

				<?php }elseif($_smarty_tpl->tpl_vars['cat_item']->value['module']=='url'){?>
					<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Url"),$_smarty_tpl);?>

				<?php }?>
			</td>
			<td>
				<form class="form-inline" action="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'category','a'=>'index'),$_smarty_tpl);?>
" method="post">
					<div class="form-group">
						<?php if ($_smarty_tpl->tpl_vars['cat_item']->value['id']==1){?>
							<input class="form-control input-sm" type="text" readonly name="cat_name" value="<?php echo $_smarty_tpl->tpl_vars['cat_item']->value['name'];?>
"/>
						<?php }else{ ?>
							<input class="form-control input-sm" type="text" name="cat_name" value="<?php echo $_smarty_tpl->tpl_vars['cat_item']->value['name'];?>
"/>
						<?php }?>
					</div>
					<div class="form-group">
						<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Order"),$_smarty_tpl);?>
：
						<input class="form-control input-sm ytadmin-input-min" type="text" name="weight" value="<?php echo $_smarty_tpl->tpl_vars['cat_item']->value['weight'];?>
" />	
					</div>
					<input type="hidden" name="cat_id" value="<?php echo $_smarty_tpl->tpl_vars['cat_item']->value['id'];?>
"/>
					<input type="submit" name="cat_update" class="btn btn-sm" value="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>'Update'),$_smarty_tpl);?>
"/>
				</form>
			</td>
			<td>
				<?php if ($_smarty_tpl->tpl_vars['cat_item']->value['cat_son_count']!=0){?>
					<a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'category','a'=>'index','now_cat_id'=>$_smarty_tpl->tpl_vars['cat_item']->value['id']),$_smarty_tpl);?>
" class="btn btn-info btn-sm"><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"View"),$_smarty_tpl);?>
 [<?php echo $_smarty_tpl->tpl_vars['cat_item']->value['cat_son_count'];?>
]</a>
				<?php }?>
			</td>
			<td>
				<div class="btn-group">
					<?php if ($_smarty_tpl->tpl_vars['cat_item']->value['visible']){?>
						<a class="btn btn-info btn-sm"><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Visible"),$_smarty_tpl);?>
</a>
						<a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'category','a'=>'index','cat_id'=>$_smarty_tpl->tpl_vars['cat_item']->value['id'],'cat_update'=>1,'visible'=>0),$_smarty_tpl);?>
" class="btn btn-default btn-sm"><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Hidden"),$_smarty_tpl);?>
</a>
					<?php }else{ ?>
						<a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'category','a'=>'index','cat_id'=>$_smarty_tpl->tpl_vars['cat_item']->value['id'],'cat_update'=>1,'visible'=>1),$_smarty_tpl);?>
" class="btn btn-default btn-sm"><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Visible"),$_smarty_tpl);?>
</a>
						<a href="" class="btn btn-info  btn-sm"><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>"Hidden"),$_smarty_tpl);?>
</a>
					<?php }?>
				</div>
			</td>
			<td>
				
				<form class="form-inline" action="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'category','a'=>'index'),$_smarty_tpl);?>
" method="post">				
					<input type="hidden" name="cat_module" value="<?php echo $_smarty_tpl->tpl_vars['cat_item']->value['module'];?>
"/>
					<input type="hidden" name="cat_id" value="<?php echo $_smarty_tpl->tpl_vars['cat_item']->value['id'];?>
"/>					
					<input type="submit" name="cat_delete" class="btn btn-warning btn-sm" value="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['T'][0][0]->__template_T(array('w'=>'Delete'),$_smarty_tpl);?>
"/>	 
				</form>
			
				
			</td>
		</tr>
		<?php }} ?>
	</table>
</div>
<?php $_template = new Smarty_Internal_Template("tpl/footer.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate(); $_template->rendered_content = null;?><?php unset($_template);?>